<cfparam name="view" default="workshops" />
<cfparam name="selectedProgramYear" default="2013-2014" />
<cfparam name="printable" type="boolean" default="false" />

<cfif NOT IsUserLoggedIn() or NOT StructKeyExists(request, "authUser")>
	<cflocation url="?logout" addtoken="no" />
</cfif>

<cfinclude template="#request.pathToUI#/controller.cfm">

<!--- check for PA and OAP and force user to complete them if they aren't done --->
<cfif NOT IsUserInRole("system") AND ((view neq "editPA" AND (request.authUser.paID eq 0 OR Len(Trim(request.authUser.paID))) eq 0) OR 
		(view neq "editPA" AND view neq "editOAP" AND (request.authUser.oapID eq 0 OR Len(Trim(request.authUser.oapID)) eq 0)))>
	<cfscript>
		storedProcedureGateway = new assets.calgrants.com.gateway.StoredProcedureGateway();
		authUser = storedProcedureGateway.call(sp = "authUser", User_ID = GetAuthUser(), Email = "", Password = "", Program_Year = request.currentProgramYear);
	</cfscript>
	<cfif authUser.PA_ID eq 0 OR Len(Trim(authUser.PA_ID)) eq 0>
		<cflocation url="?view=editPA&returnView=#view#&PA_ID=0" addtoken="no" />
	<cfelseif authUser.OAP_ID eq 0 OR Len(Trim(authUser.OAP_ID)) eq 0>
		<cflocation url="?view=editOAP&returnView=#view#&OAP_ID=0" addtoken="no" />
	</cfif>
</cfif>
<cfset noCacheToken = DateFormat(Now(), "yyyymmdd") & TimeFormat(Now(), "hhmmss") />
<!DOCTYPE html>
<html>
<head>
	<cfif NOT printable>
		<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800" rel="stylesheet" type="text/css" />
	<cfelseif printable and view eq "howDidWeDo">
		<link href="//fonts.googleapis.com/css?family=Cabin:400,500,600,700|Cabin+Condensed:400,500,600,700|Open+Sans:300,400,600,700,800|Open+Sans+Condensed:300,700&effect=fire-animation" rel="stylesheet" type="text/css" />
	</cfif>
	
	<title>Cash for College Workshop Management System</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="Mon, 22 Jul 2002 11:12:01 GMT">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="Cash for College Workshop Management System">
	<meta name="author" content="Syntric">
	<cfoutput>
		<link href="#request.pathToBootstrapCSS#" rel="stylesheet" />
		<link href="#request.pathToKendoCommonCSS#" rel="stylesheet" />
		<link href="#request.pathToKendoDefaultCSS#" rel="stylesheet" />
		<link href="#request.pathToUI#/common.css" rel="stylesheet" />
		<link href="/assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
		<link href="/assets/font-awesome/css/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
		<!--- <script src="//code.jquery.com/jquery-1.10.1.min.js?v=#noCacheToken#"></script>
		<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js?v=#noCacheToken#"></script> --->
		<script src="#request.pathToJQuery#" type="text/javascript"></script>
		<script src="#request.pathToBootstrap#" type="text/javascript"></script>
		<script src="#request.pathToKendo#" type="text/javascript"></script>
		<script src="#request.pathToUI#/common.js" type="text/javascript"></script>
	</cfoutput>
	<cfif NOT printable>
		<style>
			body {
				font-family: "Open Sans", "Helvetica Neue", Helvetica, Myriad, Arial, sans-serif;
				background-color: #54b1cd;
			}
		</style>
	<cfelseif printable and view eq "howDidWeDo">
		<style>
			body {font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;}
		</style>
	</cfif>
	<!--- <cfif NOT printable>
		<script>
			$(function(){
				//$("#timeline-indicator").css({"left": calculateTimelineProgress()});
			})
		</script>
	</cfif> --->
</head>

<body>
	<cfif NOT printable>
		<div id="page" class="container">
			<div class="row">
				<div class="span12">&nbsp;</div>
			</div>
			<div class="row">
				<!--- header --->
				<div class="span6">
					<img src="common/images/Cash_for_College_logo.gif" width="204" height="54" style="margin-left: 15px;">
				</div>
				<div class="span6" style="padding-top: 24px;">
					<!--- user drop down --->
					<cfoutput>
						<div class="btn-group  pull-right" style="margin-right: 20px;">
							<button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">Signed in as #request.authUser.fullName#</button>
							<button class="btn btn-mini dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
							<ul class="dropdown-menu">
								<li class="btn-mini"><a href="?view=editUser&returnView=#view#&User_ID=#GetAuthUser()#">Account</a></li>
								<cfif IsUserInRole("Organizer")>
									<li class="btn-mini"><a href="?view=editOrganization&returnView=#view#&Organization_ID=#request.authUser.organizationID#">Organization</a></li>
									<li class="btn-mini"><a href="/assets/calgrants/ui/printable/2015_California_Cash_for_College_Partnership_Agreement.pdf" target="_blank">Partnership Agreement</a></li>
									<li class="btn-mini"><a href="?view=oap&returnView=#view#&OAP_ID=#request.authUser.oapID#">Outreach Action Plan</a></li>
									<li class="btn-mini"><a href="?view=users&returnView=#view#">Users</a></li>
									<li class="btn-mini"><a href="?view=sites&returnView=#view#">Sites</a></li>
								</cfif>
								<li class="btn-mini"><a href="?logout=true">Logout</a></li>
							</ul>
						</div>
					</cfoutput>
				</div>
			</div>
			<div class="row" style="height: 30px;">
				<div class="span12">&nbsp;</div>
			</div>
			<div class="row">
				<!--- main nav --->
				<div class="span4" onMouseOver="navToggle('prepare')" onMouseOut="navToggle('prepare')">
					<ul class="nav" style="margin-left: 15px; margin-bottom: 12px;">
						<li class="dropdown">
							<div id="prepare" class="dropdown-toggle nav-large" data-toggle="dropdown">Prepare</div>
							<div class="dropdown-toggle nav-small" data-toggle="dropdown">Before January</div>
							<ul class="dropdown-menu" style="width: 90%">
								<li><a href="?view=workshops">Register Workshops</a></li>
								<li><a href="?view=orders">Order Materials</a></li>
								<!--- <li><a href="?view=volunteers">Register Volunteers</a></li> --->
								<li><a href="?view=promote">Promote Workshops</a></li>
								<li><a href="?view=training">Training</a></li>
							</ul>
						</li>
					</ul>
				</div>
				<div class="span4" style="margin-left: 0;" onMouseOver="navToggle('deliver')" onMouseOut="navToggle('deliver')">
					<ul class="nav" style="margin-bottom: 12px;">
						<li class="dropdown">
							<div id="deliver" class="dropdown-toggle nav-large" data-toggle="dropdown">Deliver</div>
							<div class="dropdown-toggle nav-small" data-toggle="dropdown">January to March 2nd</div>
							<ul class="dropdown-menu" style="width: 90%">
								<li><a href="?view=launch">Launch Workshops</a></li>
								<li><a href="?view=exitSurveys">Exit Surveys</a></li>
								<li><a href="?view=followUp">Follow Up Requests</a></li>
							</ul>
						</li>
					</ul>
				</div>
				<div class="span4" style="margin-left: 18px;" onMouseOver="navToggle('followThrough')" onMouseOut="navToggle('followThrough')">
					<ul class="nav" style="margin-bottom: 12px;">
						<li class="dropdown">
							<div id="followThrough" class="dropdown-toggle nav-large" data-toggle="dropdown">Follow Through</div>
							<div class="dropdown-toggle nav-small" data-toggle="dropdown">After March 2nd</div>
							<ul class="dropdown-menu" style="width: 90%">
								<li><a href="?view=funds">Site Support Funds</a></li>
								<!--- <li><a href="?view=followUp2">Student Follow-Up</a></li>
								<li><a href="?view=acknowledge">Acknowledge Volunteers &amp; Partners</a></li>--->
								<li><a href="?view=scholarships">Announce Scholarships</a></li>
								<li><a href="?view=howDidWeDo">How Did We Do?</a></li>
							</ul>
						</li>
					</ul>
				</div>
			</div>
			<div class="row">
				<!--- timeline --->
				<div id="timeline" style="background-image: url('common/images/timeline.png'); width: 960px; height: 15px; border: 0;">
					<!--- <img id="timeline-indicator" src="common/images/timeline-arrow-indicator.png" border="0"> --->
				</div>
			</div>
			<cftry>
				<!--- interface --->
				<cfinclude template="#request.pathToUI#/interfaces/#view#.cfm">
				<cfcatch type="missinginclude">
					<div class="row">
						<div class="span12" style="padding-top: 40px;">
							<h3>Page Not Found</h3>
							<p>The page you have requested could not be found.  Please make another selection.</p>
						</div>
					</div>
				</cfcatch>
			</cftry>
			<!--- footer --->
			<div class="row" style="padding-bottom: 90px; padding-top: 50px; background-color: #f7f6f6;">
				<div class="span3">
					<img src="common/images/Cash_for_College_logo_small.gif" width="161" height="40" style="padding: 0; margin: 0;"><br>
				</div>
				<div class="span3" style="line-height: 26px;">
					<span class="nav-medium">Prepare</span><br>
					<a href="?view=workshops">Register Workshops</a><br>
					<a href="?view=orders">Order Materials</a><br>
					<!--- <a href="?view=volunteers">Register Volunteers</a><br> --->
					<a href="?view=promote">Promote Workshops</a><br>
					<a href="?view=training">Training</a><br>
				</div>
				<div class="span3" style="line-height: 26px;">
					<span class="nav-medium">Deliver</span><br>
					<a href="?view=launch">Launch Workshops</a><br>
					<a href="?view=exitSurveys">Exit Surveys</a><br>
					<a href="?view=followUp">Follow Up Requests</a><br>
				</div>
				<div class="span3" style="line-height: 26px;">
					<span class="nav-medium">Follow Through</span><br>
					<a href="?view=funds">Site Support Funds</a><br>
					<!--- <a href="#">Student Follow-Up</a><br>
					<a href="?view=acknowledge">Acknowledge Volunteers &amp; Partners</a><br>--->
					<a href="?view=scholarships">Announce Scholarships</a><br>
					<a href="?view=howDidWeDo">How Did We Do?</a><br>
				</div>
			</div>
			<div class="row" style="padding-bottom: 20px; padding-top: 20px; color: #ffffff; background-color: #0053a1;">
				<div class="span12" align="center">
					<small>
						<cfoutput>
							&copy; #Year(Now())# #request.personality.name#<br />
						</cfoutput>
						Cash for College is California's public-private partnership program administered by the California Student Aid Commission and its regional and local partners<br />
						<cfoutput>
							Program Assistance: <a href="mailto:#request.personality.email#" style="color: ##54b1cd;">#request.personality.email#</a> / Technical Assistance: <a href="mailto:#request.developer.email#" style="color: ##54b1cd;">#request.developer.email#</a><!---  or #request.developer.phone# --->
						</cfoutput>
					</small>
				</div>
			</div>
		</div>
	<cfelse>
		<cfinclude template="/assets/calgrants/ui/interfaces/printable.cfm">
	</cfif>
</body>
</html>